<?php

class ModAmiControleurDefaut extends ControleurGenerique
{

	function pageMembreStatutAmi()
	{
		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$statutAmi = $modeleAmi-> pageMembreStatutAmi(htmlspecialchars($_GET['idPageMembre']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "pageMembreStatutAmi", array($statutAmi));
	}
	function requeteAmi(){
		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$resultat = $modeleAmi-> requeteAmi(htmlspecialchars($_GET['idAmi']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "requeteAmi", array($resultat));


	}
	function supprimerAmi(){

		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$modeleAmi-> supprimerAmi(htmlspecialchars($_GET['idAmi']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "supprimerAmi", array(""));
	}
		function supprimerDemandeAmi(){

		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$modeleAmi-> supprimerDemandeAmi(htmlspecialchars($_GET['idAmi']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "supprimerAmi", array(""));
	}
	function voirAmi(){
		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$information = $modeleAmi-> voirDemandeAmi(htmlspecialchars($_SESSION['idConnecte']));
		$information2 = $modeleAmi-> voirAmi(htmlspecialchars($_SESSION['idConnecte']));
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "voirAmi", array($information,$information2));

	}
	function accepterDemande(){
		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$modeleAmi-> accepterDemande(htmlspecialchars($_GET['idAmi']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "operationeffectué", array());

	}
	function refuserDemande(){
		require_once ("modules/mod_Ami/modele/modele_Ami.php");
		$modeleAmi = new modele_Ami;
		$modeleAmi-> supprimerDemandeAmi(htmlspecialchars($_GET['idAmi']),$_SESSION['idConnecte']);
		require_once ("modules/mod_Ami/vue/vue_Ami.php");
		$this->constructView("ModAmiVue", "operationeffectué", array());

	}

}
?>